package com.观察者模式.案列2.observer;

import com.观察者模式.案列2.dto.OmsDto;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

/**
 * 关闭订单
 */
@Service
public class ShutdownOrder implements ObserverInterface {
    @Override
    public void update(OmsDto omsDto) throws InterruptedException {
        TimeUnit.SECONDS.sleep(5);
        System.out.println("关闭订单执行.....当前订单id是："+omsDto.getOrderId());
    }
}
